Skip to content

fix(objectql): the security-catalog name-conflict refusals say a permission set holds one name per namespace - #33463

Queued
objectstack-fleet[bot] wants to merge 1 commit into
mainfrom
claude/area-E2-33389
Queued

objectstack-fleet[bot] wants to merge 1 commit into
mainfrom
claude/area-E2-33389

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread
Fixes #33389

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:SecurityCatalogNameConflictError 的两段报错文字(热安装与冷启动)不再说「岗位、权限集、能力每个部署一个名字」,改成「岗位和能力每个部署一个名字,权限集每个命名空间一个持有者」,并列出仍只有一个持有者的情形;措辞与 docs(spec): the permission set name describe and the permission sets page say one holder per namespace #33384 落地的 describe 一致。
  • 为什么改:feat(core, objectql, metadata, metadata-protocol, plugin-security): a permission-set name is held once per namespace, judged by one predicate (ADR-0150 child B) #32742 之后权限集按 (包, 名字) 识别,两个不同命名空间的包可以各持有同名权限集,旧句子从那时起就是错的;拒绝本身一直只在 permissionSetHoldersMeet 判定相遇时触发,没有错。
  • 风险与回滚:只改报错文字和一段代码注释,不动规则、错误码(NAMESPACE_CONFLICT)或状态码(422);@objectstack/objectql patch changeset。回滚即 revert。
  • 先看:packages/objectql/src/registry.ts 新增的 SECURITY_CATALOG_NAME_RULE 常量,以及它在 coldBootConflictMessage 与 SecurityCatalogNameConflictError 构造函数里的两处引用。
  • 两分钟验证:grep -n "A permission set holds one name per" packages/objectql/src/registry.ts,预期恰命中常量一行;grep -n "Positions, permission sets and capabilities each" packages/objectql/src/registry.ts 预期零命中。
  • 需要你做的:无,席位落地。

What changes

  • packages/objectql/src/registry.ts:
    • New module constant SECURITY_CATALOG_NAME_RULE, the one rule sentence both wordings of SecurityCatalogNameConflictError state: "Positions and capabilities each hold one name per deployment. A permission set holds one name per namespace: packages of two namespaces may each hold a set of one name, while two packages of one namespace, a package with no namespace, a platform package (base, system, sys), the environment and the platform-requested guest_portal share one set of it." This is the holder list of the permission set name describe that docs(spec): the permission set name describe and the permission sets page say one holder per namespace #33384 landed (packages/spec/src/security/permission.zod.ts), in the same words.
    • coldBootConflictMessage (the cold-boot refusal): FROM "Positions, permission sets and capabilities each hold one name per deployment: an assignment names a position or a permission set by its bare name, so with two holders the environment's stored item would be served in place of the package's definition." TO the rule sentence, then "Under that rule the environment's item and the package's share one definition of the name, so with two holders the environment's stored item would be served in place of the package's definition."
    • The hot-install message in the SecurityCatalogNameConflictError constructor: FROM "Positions, permission sets and capabilities each hold one name per deployment: an assignment names a position or a permission set by its bare name, with no package to tell two definitions apart, so with two holders which definition grants would depend on registration order." TO the rule sentence, then "Under that rule PACKAGE and each holder named here share one definition of the name, with nothing to tell two definitions of it apart, so with two holders which definition grants would depend on registration order."
    • The comment in SchemaRegistry.registerItem that explains why the three security catalog types are refused ("an assignment names a position or a permission set with no package context") now says a position or a capability is named with no package context and a permission set's name has one holder per namespace (ADR-0150 D2/D9, permissionSetHoldersMeet).
  • .changeset/33389-security-catalog-conflict-text.md: @objectstack/objectql patch.

No rule changes. The doors, permissionSetHoldersMeet and the envelope (NAMESPACE_CONFLICT, 422) are untouched; the head and the remedy of each message are unchanged.

Tests

No test pinned the old sentence: git grep on 0c2aeb9643 for "Positions, permission sets and capabilities", "assignment names a", "no package to tell" and "served in place of the package" found only registry.ts itself, a docs page, an ADR, a migration entry and comments (listed under Acceptance notes); no assertion in objectql, runtime, plugin-security, cloud-connection, metadata-protocol or dogfood reads either sentence. No new pin is added: the refusal prose has no consumer that parses it, and the existing suites already assert the envelope (code and status) and the holders. Local readings at 2a6c935f7e, under os-verify-lock:

  • objectql build closure, then vitest run on registry-security-catalog-namespace, protocol-permission-set-name-registry-reading, registry-security-catalog-names-held-by, manifest-service-residual-security-seal and environment-overlay-five-types: 5 files, 103 tests passed. objectql typecheck, including check:test-typecheck: OK.
  • protocol-boot-hydration-scoped, package-scoped-exact-qualifier and registry-namespace-install-gate: 3 files, 314 tests passed.
  • eslint --no-inline-config on registry.ts: exit 0.

Acceptance notes

Other places that say a permission set holds one name per deployment, read on 0c2aeb9643 and left alone, each for the reason given:

  • packages/metadata-protocol/src/protocol-save-door-refusals.ts (the save door's Security catalog name conflict refusal): already says "A permission set holds one name per namespace" with the same holder list. Nothing to change.
  • packages/spec/src/migrations/entries/semantic/18.security-catalog-environment-overlay-refused.ts (reason: "Positions, permission sets and capabilities hold one name per deployment"): an ADR-0087 migration entry describing a v18 change, in packages/spec, outside this lane. docs(spec): the permission set name describe and the permission sets page say one holder per namespace #33384 raised it as an open question.
  • packages/spec/src/kernel/customization-package.ts:252 (the adr_0146_d6_security_catalog basis): describes ADR-0146 D6 as written.
  • packages/objectql/src/security-catalog-namespace.ts module header: its first section states the original rule and its own "The narrowing: a permission set is one name per namespace" section already states the ADR-0150 narrowing.
  • Test comments, not assertions: packages/objectql/src/protocol-boot-hydration-scoped.test.ts:217, packages/qa/dogfood/test/showcase-security.ts:32, packages/qa/dogfood/test/showcase-d7-default-profile.dogfood.test.ts:65.
  • content/docs/permissions/delegated-administration.mdx:69 ("an assignment names a position or set, and the gate resolves the name in the security catalog"): a description of the delegated-admin gate, not of the holder rule.
  • Decision records (ADR-0048 addendum, ADR-0131, ADR-0146 D6): not touched.

Verification

Derived gates at 2a6c935f7e: dispatch-gates --commands gave 65 families. 64 exited 0. check:dual-build-cjs-loads exited 3, a prerequisite not met because only the objectql closure was built, so it is NOT MEASURED; CI Build Core covers it. dispatch-gates --ran reconciles 65 of 65. The CI check-runs on this pull are the authority for every gate family.


Generated by Claude Code

…ission set holds one name per namespace

The hot-install and cold-boot texts of SecurityCatalogNameConflictError
said positions, permission sets and capabilities each hold one name per
deployment. Since ADR-0150 D2/D9 a permission set holds one name per
namespace; both texts now state that rule in the words of the permission
set name describe. Text only: the doors and permissionSetHoldersMeet are
unchanged.

Claude-Session: https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

3 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 21 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 0c2aeb9643b91ff7d53c6e745371cfe59a5e0a26 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 88339c9efa26f679734de0de02d41a2b7f1c90aa — the merge of head 2a6c935f7e18190b2dfadc580419952df0893af9 into base 0c2aeb9643b91ff7d53c6e745371cfe59a5e0a26, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 88339c9efa26f679734de0de02d41a2b7f1c90aa && git checkout 88339c9efa26f679734de0de02d41a2b7f1c90aa
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0c2aeb9643b91ff7d53c6e745371cfe59a5e0a26 2a6c935f7e18190b2dfadc580419952df0893af9 && git checkout -B drift-repro 0c2aeb9643b91ff7d53c6e745371cfe59a5e0a26 && git merge --no-ff 2a6c935f7e18190b2dfadc580419952df0893af9

node scripts/docs-audit/affected-docs.mjs --json 0c2aeb9643b91ff7d53c6e745371cfe59a5e0a26

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · os-elon-musk · session_016WV4cyrFFk86Jqf7Mp5Rzw
Request: review · area E2 · head 2a6c935

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract-review-claim: session_016WV4d1PGptBW3QRQNmy5e6 · head 2a6c935 · 2026-11-14T22:34:58Z

review#3.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Review — PASS

Head-sha: 2a6c935f7e18190b2dfadc580419952df0893af9

The PR touches two files: packages/objectql/src/registry.ts and a changeset. The change is text only.

  • Accurate. The new SECURITY_CATALOG_NAME_RULE sentence is, word for word, the rule that the permission set name describe in packages/spec/src/security/permission.zod.ts states. That describe is also rendered in content/docs/references/security/permission.mdx. Both the cold-boot and the hot-install wordings now use the constant. The old "permission sets … one name per deployment" stopped being true with ADR-0150 D2/D9. The new "share one definition of the name" clause reads correctly in both contexts. The registerItem comment now names permissionSetHoldersMeet as the judge.
  • No behaviour moves. The error class, its NAMESPACE_CONFLICT code and its 422 status are unchanged. Which holders are refused is still decided by the doors, not by this text, and no pin quoted the old prose. Clause-②: no, Metadata-protocol: none and patch hold.
  • Noted, outside this area: packages/spec/src/migrations/entries/…/18.security-catalog-environment-overlay-refused.ts still says "one name per deployment". That belongs to the spec lane, as docs(spec): the permission set name describe and the permission sets page say one holder per namespace #33384's report already raised.

The ACCEPT re-reads every check at the landing head.

Reviewed-by: session_016WV4d1PGptBW3QRQNmy5e6 (review#3)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · os-elon-musk · session_016WV4cyrFFk86Jqf7Mp5Rzw
ACCEPT · area E2 (area-lease pilot #33059) · Fixes #33389 · head 2a6c935

  • Review: review#3 PASS at 2a6c935 (record 6885281334). The change is refusal text and a comment only. The error class, its code and its status are unchanged.
  • Governed: check-governed-merges --pr 33463 NOT governed (0 of 2 paths); +37 / -10.
  • Checks: every check run at 2a6c935 is success or skipped by its path selector, except Test Core (1/8), which is still running. Auto-merge and the merge queue land it only once it passes.
  • Landing: maintainer's instruction in the area thread (15:21Z): PRs in this area that passed review go ready + auto-merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 14, 2026 22:37
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 14, 2026
Any commits made after this event will not be merged.
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43649139727 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (7/8) — 失败步骤: Run this shard's tests

    @objectstack/plugin-approvals:test:  FAIL  src/action-page-member.integration.test.ts > [#22578] handleActionPage — the ADR-0043 action page from a Request > GET renders the confirm page for a live to
      ↳ 失败原因: @objectstack/plugin-approvals:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 18 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · os-elon-musk · session_016WV4cyrFFk86Jqf7Mp5Rzw
Queue note · head 2a6c935

Queue build 43649139727 failed on @objectstack/plugin-approvals src/action-page-member.integration.test.ts. The cause was "Test timed out in 5000ms", a timeout and not an assertion. The test is outside this PR's diff: refusal text in objectql registry.ts, with no code path or error shape changed. The same signature ejected #33439 in the same speculative stack, and #33508 now anchors it. I am re-arming auto-merge once. A second queue failure on the same signature waits for #33508.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

objectql: the security-catalog name-conflict refusals still say a permission set holds one name per deployment

2 participants